"; echo ""; ?> "; echo "Error!!!"; echo ""; echo ""; echo ""; echo "

"; echo "You are not logged in
"; echo "Or Your session has been expired

"; echo "Login"; echo "

"; echo ""; echo ""; exit(); } if($action=="sendpm") { echo ""; echo "Inbox"; echo ""; echo ""; echo ""; echo "

"; echo("Inbox"); echo "

"; echo "

"; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = (time() - $timeadjust); $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); $pmfl = $lastpm[0]+getpmaf(); if($byuid==1)$pmfl=0; if($pmfl<$tm) { if(!isblocked($pmtext,$byuid)) { if((!isignored($byuid, $who))&&(!istrashed($byuid))) { $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); }else{ $res = true; } if($res) { echo "\"O\"/"; echo "PM was sent successfully to "; echo "$whonick

"; echo parsepm($pmtext, $sid); }else{ echo "\"X\"/"; echo "Can't Send PM to $whonick

"; } }else{ $bantime = (time() - $timeadjust) + (7*24*60*60) ; echo "\"X\"/"; echo "Can't Send PM to $whonick

"; echo "You just sent a link to one of the crapiest sites on earth
The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your Credits
3. You are BANNED!"; mysql_query("INSERT INTO ibwf_metpenaltiespl SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'"); mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'"); mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'"); } }else{ $rema = $pmfl - $tm; echo "\"X\"/"; echo "Flood control: $rema Seconds

"; } echo "

"; if($page=="" || $page<=0)$page=1; $myid = getuid_sid($sid); $doit=false; $num_items = getpmcount($myid); //changable $items_per_page= 1 ; $num_pages = ceil($num_items/$items_per_page); if($page>$num_pages)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; $sql = "SELECT a.name, b.id, b.byuid, b.unread, b.starred FROM ibwf_users a INNER JOIN ibwf_private b ON a.id = b.byuid WHERE b.touid='".$myid."' AND b.unread='1' ORDER BY b.timesent LIMIT $limit_start, $items_per_page "; $items = mysql_query($sql); echo mysql_error(); while ($item = mysql_fetch_array($items)) { if($item[3]=="1") { $iml = "\"+\"/"; }else{ if($item[4]=="1") { $iml = "\"*\"/"; }else{ $iml = "\"-\"/"; } } $lnk = "$iml $item[0]"; echo "$lnk
"; } echo "Back to inbox
"; echo "Back to Chat
"; echo "\"\"/Home"; echo "

"; echo ""; } else if($action=="sendpopup") { echo ""; echo "Send Popup"; echo ""; echo ""; echo ""; echo "

"; $pmid = $_GET["pmid"]; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_popups WHERE byuid='".$byuid."'")); $pmfl = $lastpm[0]+getpmaf(); $pmurd = mysql_query("UPDATE ibwf_popups SET unread='0' WHERE id='".$pmid."'"); if($byuid==1)$pmfl=0; if($pmfl>$tm) { $rema = $pmfl - $tm; echo "\"X\"/"; echo "Flood control: $rema Seconds

"; echo "Buddylist
"; echo "\"\"/Home"; echo "

"; exit(); } $uid = getuid_sid($sid); if (!arebuds($uid, $who)) { echo "$whonick is not in ur buddy list

"; echo "Buddylist
"; echo "\"\"/Home"; echo "

"; exit(); } if(!popupson($who)) { echo "$whonick has there popups disabled

"; echo "Buddylist
"; echo "\"\"/Home"; echo "

"; exit(); } if(isignored($uid, $who)) { echo "\"X\"/"; echo "Failed Sending Pop-up To $whonick they hav u on ignore...

"; echo "Buddylist
"; echo "\"\"/Home"; echo "

"; exit(); } else if(isblocked($pmtext,$byuid)) { $bantime = time() + (28*24*60*60); echo "\"X\"/"; echo "Can't Send PM to $whonick

"; echo "You just sent a link to one of the crapiest sites on earth
The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your plusses
3. You are BANNED!"; $user = getnick_sid($sid); mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='Wap Desire auto banned $user for spamming thru popups', actdt='".time()."'"); mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='2', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'"); mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'"); mysql_query("INSERT INTO ibwf_popups SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'"); mysql_query("INSERT INTO ibwf_private SET text='[b](forwarded spam via popups)[/b][br/]".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'"); echo "

"; exit(); } $res = mysql_query("INSERT INTO ibwf_popups SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); if($res) { echo "\"O\"/"; echo "Pop-up was sent successfully to $whonick

"; echo parsepm($pmtext, $sid); }else{ echo "\"X\"/"; echo "Failed Sending Pop-up To $whonick

"; } $uid = getuid_sid($sid); $location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'")); $loca = $location[0]; echo "
1 ok!
"; echo "
Disable Pop-Ups
"; if($lastloc=="cht"){ echo "Back To $rname
"; } echo "Inbox
"; echo "BuddyList
"; echo "Chat
"; echo "\"\"/Home"; echo "

"; } else if($action=="rptpop") { echo ""; echo "Reporting Popup"; echo ""; echo ""; echo ""; echo "

"; addonline(getuid_sid($sid),"Reporting Popup",""); $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, touid, reported FROM ibwf_popups WHERE id='".$pmid."'")); if(getuid_sid($sid)==$pminfo[2]) { if($pminfo[3]=="0") { $str = mysql_query("UPDATE ibwf_popups SET reported='1' WHERE id='".$pmid."' "); if($str) { echo "\"O\"/Popup reported to mods successfully

"; }else{ echo "\"X\"/Can't report Popup at the moment

"; } }else{ echo "\"X\"/This Popup is already reported

"; } }else{ echo "\"X\"/This Popup ain't yours

"; } echo "0 \"\"/Home"; echo "

"; } else if($action=="sendto") { echo ""; echo "Inbox"; echo ""; echo ""; echo ""; echo "

"; $pmtou = $_POST["who"]; $who = getuid_nick($pmtou); if($who==0) { echo "\"x\"/User Does Not exist
"; }else{ $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); $pmfl = $lastpm[0]+getpmaf(); if($pmfl<$tm) { if(!isblocked($pmtext,$byuid)) { if((!isignored($byuid, $who))&&(!istrashed($byuid))) { $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); }else{ $res = true; } if($res) { echo "\"O\"/"; echo "Inbox was sent successfully to $whonick

"; echo parsepm($pmtext, $sid); }else{ echo "\"X\"/"; echo "Can't Send Inbox to $whonick

"; } }else{ $bantime = time() + (7*24*60*60); echo "\"X\"/"; echo "Can't Send Inbox to $whonick

"; echo "You just sent a link to one of the crapiest sites on earth
The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your plusses
3. You are BANNED!"; $user = getnick_uid($sid); mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='Wap Desire auto banned $user for spamming inbox', actdt='".time()."'"); mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='2', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'"); mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'"); mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."', reported='1'"); exit(); } }else{ $rema = $pmfl - $tm; echo "\"X\"/"; echo "Flood control: $rema Seconds

"; } } echo "
Inbox
"; echo "BuddyList
"; echo "Chat
"; echo "\"\"/Home"; echo "

"; echo ""; } else if($action=="proc") { $pmact = $_POST["pmact"]; $pact = explode("-",$pmact); $pmid = $pact[1]; $pact = $pact[0]; echo ""; echo "Inbox"; echo ""; echo ""; echo ""; echo "

"; $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, touid, reported FROM ibwf_private WHERE id='".$pmid."'")); if($pact=="rep") { addonline(getuid_sid($sid),"Sending Inbox","inbox.php?action=main"); $whonick = getnick_uid($pminfo[1]); echo "Send Inbox to $whonick

"; if($lastloc=="cht"){ echo "

"; }else{ echo ""; } echo "
"; echo "
"; }else if($pact=="del") { addonline(getuid_sid($sid),"Deleting Inbox",""); if(getuid_sid($sid)==$pminfo[2]) { if($pminfo[3]=="1") { echo "\"X\"/This Inbox is reported, thus it can't be deleted"; }else{ $del = mysql_query("DELETE FROM ibwf_private WHERE id='".$pmid."' "); if($del) { echo "\"O\"/Inbox deleted successfully"; }else{ echo "\"X\"/Can't Delete Inbox at the moment"; } } }else{ echo "\"X\"/This Inbox ain't yours"; } }else if($pact=="str") { addonline(getuid_sid($sid),"Starring Inbox",""); if(getuid_sid($sid)==$pminfo[2]) { $str = mysql_query("UPDATE ibwf_private SET starred='1' WHERE id='".$pmid."' "); if($str) { echo "\"O\"/Inbox starred successfully"; }else{ echo "\"X\"/Can't star Inbox at the moment"; } }else{ echo "\"X\"/This Inbox ain't yours"; } }else if($pact=="ust") { addonline(getuid_sid($sid),"Unstarring Inbox",""); if(getuid_sid($sid)==$pminfo[2]) { $str = mysql_query("UPDATE ibwf_private SET starred='0' WHERE id='".$pmid."' "); if($str) { echo "\"O\"/Inbox unstarred successfully"; }else{ echo "\"X\"/Can't unstar Inbox at the moment"; } }else{ echo "\"X\"/This Inbox ain't yours"; } }else if($pact=="rpt") { addonline(getuid_sid($sid),"Reporting Inbox",""); if(getuid_sid($sid)==$pminfo[2]) { if($pminfo[3]=="0") { $str = mysql_query("UPDATE ibwf_private SET reported='1' WHERE id='".$pmid."' "); if($str) { echo "\"O\"/Inbox reported to mods successfully"; }else{ echo "\"X\"/Can't report Inbox at the moment"; } }else{ echo "\"X\"/This Inbox is already reported"; } }else{ echo "\"X\"/This Inbox ain't yours"; } } else if($pact=="frd") { addonline(getuid_sid($sid),"Forwarding Inbox",""); if(getuid_sid($sid)==$pminfo[2]||getuid_sid($sid)==$pminfo[1]) { echo "
"; echo "Forward to e-mail:

"; echo "

"; echo "
"; }else{ echo "\"X\"/This Inbox ain't yours"; } } else if($pact=="dnl") { addonline(getuid_sid($sid),"Downloading Inbox",""); if(getuid_sid($sid)==$pminfo[2]||getuid_sid($sid)==$pminfo[1]) { echo "\"X\"/request processed successfully

"; echo "Download Inbox"; }else{ echo "\"X\"/This Inbox ain't yours"; } } if($lastloc=="cht"){ echo "
5 Back To $rname
"; } echo "
Inbox
"; echo "BuddyList
"; echo "Chat
"; echo "\"\"/Home"; echo "

"; } else if($action=="proall") { $pact = $_POST["pmact"]; echo ""; echo "Inbox"; echo ""; echo ""; echo ""; echo "

"; addonline(getuid_sid($sid),"Deleting Inboxes",""); $uid = getuid_sid($sid); $del = mysql_query("DELETE FROM ibwf_private WHERE touid='".$uid."' AND reported !='1' AND unread='0' AND starred='0'"); if($del) { echo "\"O\"/All Inboxes Deleted Successfully"; }else{ echo "\"X\"/Can't Delete Inboxes At The Moment"; } echo "

Inbox
"; echo "BuddyList
"; echo "Chat
"; echo "\"\"/Home"; echo "

"; echo ""; } else if($action=="frdpm") { $email = $_POST["email"]; $pmid = $_POST["pmid"]; addonline(getuid_sid($sid),"Forwarding Inbox",""); echo ""; echo "Inbox"; echo ""; echo ""; echo ""; echo "

"; $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent,touid, reported FROM ibwf_private WHERE id='".$pmid."'")); if(($pminfo[3]==getuid_sid($sid))||($pminfo[1]==getuid_sid($sid))) { $from_head = "From: noreplay@$sitename"; $subject = "Inbox By ".getnick_uid($pminfo[1])." To ".getnick_uid($pminfo[3])." ($sitename)"; $content = "Date: ".date("l d/m/y H:i:s", $pminfo[2])."\n\n"; $content .= $pminfo[0]."\n------------------------\n"; $content .= "$sitename: The best wap community!"; mail($email, $subject, $content, $from_head); echo "\"X\"/Inbox forwarded to $email"; }else{ echo "\"X\"/This Inbox ain't yours"; } echo "

Inbox
"; echo "BuddyList
"; echo "Chat
"; echo "\"\"/Home"; echo "

"; echo ""; } else{ addonline(getuid_sid($sid),"Lost in inbox lol",""); echo ""; echo "Error!!!"; echo ""; echo ""; echo ""; echo "

"; echo "I don't know how did you get into here, but there's nothing to show

"; echo "
Inbox
"; echo "BuddyList
"; echo "Chat
"; echo "\"\"/Home"; echo "

"; } ?>